/*
 * dscan.h
 * KJ's simplified stream archiver (kjssar)
 * 
 * (C)Copyright 2013-2015 by Klaus-J. Wolf, kj (at) seismic (dot) de
 * This file is licensed under the General Public License Version 2.
 * http://www.gnu.org/licenses/gpl-2.0.html
 * 
 * This is a proof-of-concept implementation.
 * 
 */


struct kjssar_dentry
  {
    struct kjssar_dentry *nxt;
    struct kjssar_dentry *content;
    
    uchar   *ename;
    
    uint32  i_dev;
    uint32  i_ino;
    uint32  i_mode;
    uint32  i_nlink;
    uint32  i_uid;
    uint32  i_gid;
    uint32  i_rdev;
    uint64  i_size;
    uint32  i_blksize;
    uint64  i_blocks;
    
    uint64  i_atime;
    uint16  i_atime2;
    uint64  i_mtime;
    uint16  i_mtime2;
    uint64  i_ctime;
    uint16  i_ctime2;

    uint64  i_creatime;
    uint16  i_creatime2;
    
    uchar   *x_acl;
    uchar   *x_xattr;
    
  };


struct kjssar_dentry *kjssar_dentry_scan_f(const uchar *root, int recurse);

void kjssar_dentry_destroy(struct kjssar_dentry *r0);

int kjssar_dentry_write(int fh, struct kjssar_dentry *single);

int kjssar_dentry_read(int fh, struct kjssar_dentry *single);
